package com.jdls.day19.work;

/**
 * @author 嘉德罗斯
 * @date 2021/8/10
 */
public class Person {
        private String name;
        int age;

    public Person() {
    }

    Person(int age){
            this.age = age;
        }

        public void eat(String dx){
            System.out.println(name + "开始吃" + dx + "了");
        }

        private String getName() {
            return name;
        }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
